package com.wjh.controler;

import com.wjh.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserControler {
    @RequestMapping(value = "{name}",method = RequestMethod.GET)
    public @ResponseBody User getuser(@PathVariable String name){
        User user=new User();
        user.setUsername(name);
        user.setMobile("123456");
        return user;
    }
}
